// 搜索字段类型定义
export interface SearchField {
  prop: string
  label: string
  type: 'input' | 'number' | 'select' | 'date' | 'daterange' | 'multiselect' | 'textarea'
  placeholder?: string
  required?: boolean
  disabled?: boolean
  class?: string
  // 选择框相关
  options?: Array<{ label: string; value: any }>
  optionLabel?: string
  optionValue?: string
  filter?: boolean
  showClear?: boolean
  // 数字输入框相关
  min?: number
  max?: number
  step?: number
  // 日期相关
  dateFormat?: string
  startPlaceholder?: string
  endPlaceholder?: string
  // 多选相关
  maxSelectedLabels?: number
  // 文本域相关
  rows?: number
  autoResize?: boolean
  // 高级搜索
  advanced?: boolean
}

// 表格列类型定义
export interface TableColumn {
  prop: string
  label: string
  sortable?: boolean
  type?: 'text' | 'tag' | 'badge' | 'link' | 'image'
  slot?: string
  formatter?: (value: any, row: any, index: number) => string
  headerStyle?: string
  bodyStyle?: string
  style?: string
  class?: string
  // 标签相关
  tagClass?: string
  tagSeverity?: (value: any) => string
  // 徽章相关
  badgeClass?: string
  badgeSeverity?: (value: any) => string
  // 链接相关
  target?: string
  linkClass?: string
  href?: (row: any) => string
  // 图片相关
  alt?: string
  imageClass?: string
  imageStyle?: string
}

// 表格操作类型定义
export interface TableAction {
  key: string
  label: string
  icon?: string
  severity?: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger'
  size?: 'small' | 'large'
  class?: string
  disabled?: (row: any, index: number) => boolean
  loading?: (row: any, index: number) => boolean
  handler: (row: any, index: number) => void
}

// 分页类型定义
export interface Pagination {
  currentPage: number
  pageSize: number
  total: number
}
